package com.hospital.spd.pojo;


/**
 * @author 97261
 */
public class PaginationResultVO<T> {
    private Integer code;
    private String message;
    private T data;
    private Pager pager;

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("PaginationResultVO{");
        sb.append("code=").append(code);
        sb.append(", message='").append(message).append('\'');
        sb.append(", data=").append(data);
        sb.append(", pager=").append(pager);
        sb.append('}');
        return sb.toString();
    }

    public PaginationResultVO() {
    }

    public PaginationResultVO(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public Pager getPager() {
        return pager;
    }

    public void setPager(Pager pager) {
        this.pager = pager;
    }

    public static class Pager {
        /**
         * 第几页
         */
        private Integer page;
        /**
         * 多少条数据
         */
        private Long recTotal;
        /**
         * 每页多少条
         */
        private Integer recPerPage;
        /**
         * 一共多少页
         */
        private Integer pages;

        @Override
        public String toString() {
            final StringBuffer sb = new StringBuffer("Pager{");
            sb.append("page=").append(page);
            sb.append(", recTotal=").append(recTotal);
            sb.append(", recPerPage=").append(recPerPage);
            sb.append(", pages=").append(pages);
            sb.append('}');
            return sb.toString();
        }

        public Integer getPage() {
            return page;
        }

        public void setPage(Integer page) {
            this.page = page;
        }

        public Long getRecTotal() {
            return recTotal;
        }

        public void setRecTotal(Long recTotal) {
            this.recTotal = recTotal;
        }

        public Integer getRecPerPage() {
            return recPerPage;
        }

        public void setRecPerPage(Integer recPerPage) {
            this.recPerPage = recPerPage;
        }

        public Integer getPages() {
            return pages;
        }

        public void setPages(Integer pages) {
            this.pages = pages;
        }
    }



}
